<template>
	<page-body>
		<view class="page">
			<web-view class="szr" :src="url" :style="{ position: 'absolute', top: (0 + StatusBarRpx) + 'rpx', bottom: '0', width: '100%' }" />
		</view>
	</page-body>
</template>

<script>
	export default {
		data() {
			return {
				typr:0,//0数据大屏 1 智慧驾驶舱 2异常 3风险 4巡更
				url:'',
				uniPlatform:''
			};
		},
		onLoad(option) {
			console.log(option)
			// let link='https://aixf.zhuaizhuaiyu.com/h5/daping/'
			// https://qgzy.zhongbenjiaoyu.cn/
			this.uniPlatform=option.ym
			let id=uni.getStorageSync('USER_XQ')
			console.log(id)
			let name=option.type==0?'dashuju':option.type==1?'jiashicang':option.type==2?'yichang':option.type==3?'fengxian':option.type==4?'xungeng':option.type==5?'rcxungeng':option.type==6?'fengxianpg':option.type==7?'zhuanxiangjiancha':option.type==8?'yinhuanpc':''
			// this.url=link+name+'.html?id='+id
			let link=uni.getStorageSync('DP_url')
			// console.log(link)
			// console.log(link.indexOf('daping'))
			let types=link.indexOf('daping')!=-1?link.split('daping/')[1].split('.html')[0]:link.split('jiashicang/')[1].split('.html')[0]
			// console.log(types)
			let title=types=='dashuju'?'数据概览':types=='jiashicang'?'AI智慧消防驾驶舱':types=='xungengyc'?'计划巡更':types=='rcxungeng'?'日常巡更':types=='fengxianpg'?'风险评估':types=='zhuanxiangjiancha'?'专项检查':types=='yinhuanpc'?'隐患排查':types=='renfang'?'校园安全人防驾驶舱':types=='wufang'?'校园安全物防驾驶舱':types=='zhidufang'?'校园安全制度防驾驶舱':types=='anquantaishi'?'校园安全态势驾驶舱':'校园安全数据总览'
		
			this.url=link+'&id='+id+'&ymtype='+this.uniPlatform
			console.log(this.url)
			uni.setNavigationBarTitle({
				title:title
			})
		}
	}
</script>

<style lang="scss">
	page{
		background-color: #ffffff;
	}
	.szr{
		margin-top: auto;
		height: 99%;
	}
	.rl{
		position: fixed;
		// bottom: ;
		z-index: 99999999999;
	}
</style>